import request from '@/utils/request'
// 获取组织部门
export function getdepartments() {
  return request({
    url: '/company/department'
  })
}
// 删除组织部门
export function deletedepartments(id) {
  return request({
    url: '/company/department/' + id,
    method: 'DELETE'
  })
}
// 添加部门

export function addepartments(data) {
  return request({
    url: '/company/department',
    method: 'POST',
    data
  })
}

// 根据id找
export function getbyIdedit(id) {
  return request({
    url: '/company/department/' + id
  })
}

// 更新部门名称
export function editupdate(data) {
  return request({
    url: '/company/department/' + data.id,
    method: 'PUT',
    data
  })
}
